perm filename NOEDIT.BH[UP,DOC] blob
sn#832495 filedate 1987-01-19 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00009 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00003 00002 Using Datamedia-like displays without EDIT keys
C00008 00003 NORMAL mode for non-EDIT-key displays
C00016 00004 QUOTE mode for non-EDIT-key displays
C00023 00005 BUCKY-QUOTE modes
C00025 00006 ALL-QUOTE modes
C00028 00007 Switching modes
C00033 00008 Redefining the redefinable characters
C00038 00009 Now, here's what QUOTE mode is good for:
C00042 ENDMK
C⊗;
Using Datamedia-like displays without EDIT keys
A local SAIL display keyboard generates 9-bit characters, including
the CONTROL and META bits, and ignoring for the moment special
keys like ESC and CALL. A display with EDIT key generates
8-bit characters, so about half of all possible characters
can be entered with one keystroke. META-characters require
two keystrokes. A display without EDIT key, or any other
standard ASCII terminal, generates 7-bit characters, so only
about one fourth of all SAIL characters can be entered in
one keystroke. Any single choice of the single-keystroke
subset will make some kinds of typing very difficult, so
several input modes are provided for non-EDIT-key displays:
1. In NORMAL mode, the standard ASCII graphic
characters are single-keystroke, as are the line
editor commands and the prefix codes needed to
enter multi-keystroke characters. (In other
words, any character which is not single-keystroke
is two-keystroke in this mode.)
2. In QUOTE mode, almost all of the SAIL extended
graphic character set is single-keystroke. Line
editor commands are two-keystroke, and other
bucky bit characters are three-keystroke.
3. In BUCKY-QUOTE modes, some combination of
bucky bits is single-keystroke. Unmodified
graphic characters are three-keystroke. These
modes are not likely to be used for long periods,
but might be useful when typing a series of commands
to E, for example. There are three of these modes,
CONTROL-QUOTE, META-QUOTE, and CONTROL-META-QUOTE.
4. In ALL-QUOTE modes, not even CALL and HOLD are
treated specially; all characters are quoted except
a single ESCAPE code. These modes (including three
BUCKY-ALL-QUOTE modes) are not recommended except
for programmable terminals which can easily provide
arbitrary multiple-character sequences on function
keys.
Whether one chooses to type normally in NORMAL mode or in
QUOTE mode is a matter of personal preference. NORMAL mode
probably requires fewer keystrokes for most purposes, but
QUOTE mode is more similar to EDIT-key typing and may
therefore be easier to remember. QUOTE mode has the
disadvantage of requiring some three-keystroke sequences,
but if your terminal has programmable function keys, that
disadvantage can be eliminated.
NORMAL mode for non-EDIT-key displays
In NORMAL mode for a DM without an EDIT key, the ASCII control characters
(0-37 octal) will be used for line editor commands and for bucky-bit
prefixing and other special functions. The intent is to make line editor
commands as easy as possible to type. Each control character has a
standard meaning; certain ones can be redefined as an arbitrary character
macro to accomodate differences among keyboards. In the following table,
* marks a redefinable character; among the things these chars can be is
the ESCAPE character (defaulted to ↑@).
The mechanism by which characters are redefined will be explained later;
for now, simply remember that the marked characters can be assigned a
NORMAL-mode meaning different from the one in the table.
Char Meaning DD/III equivalent
↑@ * ESCAPE ESC
↑A beginning of line αFORM
↑B backward search αB
↑C CALL CALL
↑D delete forward αD
↑E enter insert mode αI
↑F forward cursor αSPACE
↑G HOLD αBREAK
↑H * backward cursor αBS
↑I * tab TAB
↑J * linefeed LF
↑K * vertical tab VT
↑L * formfeed FORM
↑M carriage return RETURN
↑N numeric arg (see below) --
↑O recall old line αRETURN
↑P quote with CONTROL (see below) --
↑Q * quote without buckies (") --
↑R repeat search or kill αR
↑S * search αS
↑T transpose αT
↑U CLEAR CLEAR
↑V quote with META (see below) --
↑W quote with CONTROL-META (") --
↑X kill (eXpunge) αK
↑Y backward kill αL
↑Z end of line αTAB
↑[ * altmode ALT
↑\ * flush output queues --
↑] * undefined
↑↑ * undefined
↑← * undefined
The DELETE or RUBOUT key does a delete backward, like βBS.
There is no single key which does βBS at the end of a line
and αBS inside the line.
The ESCAPE character performs the usual SAIL ESCAPE commands
as on local (DD/III) display terminals. (In QUOTE mode,
described later, the ESCAPE character is used both for the
usual ESCAPE commands and for additional functions unique
to no-EDIT-key DMs.)
The control characters with a DD/III equivalent are translated
to that equivalent on input. Therefore, under some special
activation conditions they will not perform the editing function
indicated but will be read by user programs. Note that none of
the ASCII format effectors are used as line editor commands,
but those characters are redefinable. A user whose keyboard
has, say, a VT key might choose to redefine that key to mean
something normally harder to type, e.g., flush output queues.
The cost of that redefinition is that an actual VT could be
entered only by quoting.
↑N is used to precede a numeric argument. Specifically, any number of
digits including + and - will be controllified (i.e., get the CONTROL
bit added) up to and not including the first nondigit. Thus, the
equivalent of α2α3αD is ↑N23↑D.
There are four quoting characters: ↑Q, ↑P, ↑V, and ↑W. Each of these
causes the following (7-bit) character typed to be quoted and given
one of four possible bucky bit values. ↑Q (mnemonic for Quote) quotes
with no bucky bits. ↑W (mnemonic for DOUBLEyou) quotes with
control-meta. The others aren't very mnemonic, unfortunately, but they
quote with CONTROL (↑P) and with META (↑V). So, for example, β is
typed ↑Q↑C.
The only way to undo a quoting character is to type NULL (↑@), which
is an invalid character when quoted. Since all other ASCII characters
are quotable, none can be used to undo a ↑Q etc.
The HOLD character (↑G) can be used in two modes. The default mode
is that the same code toggles holding and unholding, like the HOLD
key on an EDIT-key DM. This is called HTOGGLE mode. That mode is
most convenient for local users with fast echo, who should never
have trouble knowing whether or not they are holding. Arpanet
users with greater echo delays may prefer NO HTOGGLE mode, in
which the ↑G character always means HOLD, and another character
sequence (ESCAPE ↑G) must be used for unhold. The monitor
command TTY [NO] HTOGGLE selects the holding mode.
The following functions are normally done by two-character
escape sequences:
deferred CALL ESC CALL ↑@↑C
unhold ESC HOLD ↑@↑G (in NO HTOGGLE mode)
QUOTE mode for non-EDIT-key displays
In QUOTE mode, the ASCII control codes (0-37 octal) are used to
represent the extended SAIL graphics, except for a few codes
reserved for special purposes: ESCAPE, CALL, and HOLD. The
CALL and HOLD characters are ↑C and ↑G, as in NORMAL mode.
(The HOLD character is, regrettably, different from the one
used with EDIT-key DMs; the character ↑← may be hard to type
on some keyboards.) The ESCAPE character defaults to NULL (↑@)
but other ESCAPE characters can be defined, as in NORMAL mode.
All special functions other than CALL and HOLD are entered
with a sequence of characters starting with ESCAPE. In
general, ESCAPE followed by an ASCII control character has
the effect that the control character alone would have in
NORMAL mode. For example, ESCAPE ↑S is the line editor
search command. In particular, the way to enter arbitrary
bucky-bit characters is the three-keystroke sequence
ESCAPE QUOTER CHAR, e.g., ESCAPE ↑V X is META-X.
The sequence ESCAPE ESCAPE is equivalent to ESCAPE. The
sequence ESCAPE CALL is a quoted ↑C, i.e., a beta; similarly,
ESCAPE HOLD is a quoted ↑G or pi. If you are using an ESCAPE
character other than NULL, the underlying graphic character
can be entered with ESCAPE ↑Q ESCAPE, e.g., if you have
set up ↑↑ (≡) as an ESCAPE character, then ↑↑ ↑Q ↑↑ is the
way to type ≡.
The only remaining problem is that the special meaning of
ESCAPE applied to ASCII control codes overrides the usual
SAIL escape commands. So far the only command affected is
ESCAPE FORM to clear the page printer. When you type
ESCAPE FORM on a QUOTE-mode DM, you simply get a FORM character,
unless that character has been redefined. (If FORM has been
redefined, then in QUOTE mode, just FORM gets you a plain
FORM and ESCAPE FORM gets you the redefinition.) To
enter the system ESCAPE FORM command, a QUOTE-mode DM user
must type ESCAPE " FORM. If other escape commands are defined
for below-40 characters, the same mechanism will be used to
enter such commands from QUOTE mode. The WAITS escape command
ESCAPE n CR, which expands a macro (n is a number), is an
exception in that it does NOT need the " character (since CR is
never allowed to mean anything but CR). So ESCAPE n CR does
work to expand a character macro (ESCAPE n " CR does the same
thing) even on a quote-mode noedit display.
The ESCAPE " mechanism is also used to enter the functions
deferred CALL and unhold, which in NORMAL mode are typed
ESCAPE CALL and ESCAPE HOLD. In QUOTE mode you must type
ESCAPE " CALL and ESCAPE " HOLD.
Here are some examples of character sequences typed in
NORMAL and QUOTE modes:
you type you type
DD/III equivalent NORMAL mode QUOTE mode
ε (epsilon) ↑Q ↑F ↑F
αε (CONTROL-ε) ↑P ↑F ESCAPE ↑P ↑F
α<SP> (cursor forward) ↑F ESCAPE ↑P <SP> or ESCAPE ↑F
CALL ↑C ↑C
α<CALL> (deferred) ESCAPE ↑C ESCAPE " ↑C
β (beta) ↑Q ↑C ESCAPE ↑C
E E E
α<BREAK> (hold) ↑G (unless HTOGGLE) ↑G (unless HTOGGLE)
α<CLEAR> (unhold) ESCAPE ↑G (") ESCAPE " ↑G (")
you type NORMAL meaning QUOTE meaning
↑B backsearch α (alpha)
↑P controlify next char ⊂ (subset)
ESCAPE ↑B ESCAPE αB (useless) backsearch
ESCAPE ↑P (wait for next char) controlify next char
ESCAPE ↑P X ESCAPE αX (useless) αX (CONTROL-X)
ESCAPE ESCAPE ESCAPE ESCAPE
↑C CALL CALL
ESCAPE ↑C deferred CALL β (beta)
ESCAPE " ↑C deferred CALL deferred CALL
FORM FORM (*) FORM
ESCAPE FORM ESCAPE FORM (*) FORM (*)
ESCAPE " FORM ESCAPE FORM ESCAPE FORM
ESCAPE ↑Q FORM ESCAPE FORM FORM
E E E
↑V E βE (META-E) ⊗ E
ESCAPE ↑V E ESCAPE βE (useless) βE (META-E)
ESCAPE ↑G unhold π (pi)
ESCAPE " ↑G unhold unhold
(*) means that the meaning may be different if FORM is redefined.
BUCKY-QUOTE modes
The BUCKY-QUOTE modes are just like QUOTE mode, except that an
ordinary character gets the CONTROL and/or META bits automatically.
For example, if you are in META-QUOTE mode, just typing X gets
you META-X; to get a plain X you must type ESCAPE ↑Q X.
Typing ESCAPE temporarily suspends the automatic bucky bits,
so ESCAPE W means simply ESCAPE W and not ESCAPE META-W even
in META-QUOTE mode. This is important only for the extended
escape commands like ESC [ prg αW, which can be typed
ESCAPE [ prg ↑P W in any no-EDIT-key mode!
The special characters CALL and HOLD get the automatic bucky
bits when quoted with ESCAPE. For example, in META-QUOTE
mode, ESCAPE ↑C is META-β. As in non-bucky QUOTE mode,
an ESCAPE character itself can be quoted only by explicitly
specifying the desired bits, e.g., ESCAPE ↑V ESCAPE is the
way to get the ESCAPE character with the META bit in any
of the QUOTE modes.
ALL-QUOTE modes
Users of programmable terminals may want to have every ASCII
control code be interpreted as a SAIL graphic, not even
excepting ↑C and ↑G, which are normally interpreted as
CALL and HOLD even in the four QUOTE modes. CALL and HOLD
are important enough to be typable with a single keystroke,
but a programmable terminal allows one keystroke to send
multiple characters to the computer. ALL-QUOTE modes
(ALL-QUOTE, CONTROL-ALL-QUOTE, META-ALL-QUOTE, and
CONTROL-META-ALL-QUOTE) are provided for these terminals.
The only difference between an ALL-QUOTE mode and the
corresponding QUOTE mode is that in ALL-QUOTE modes
↑C and ↑G are treated like any other ASCII control.
The following table summarizes the differences:
function in QUOTE mode in ALL-QUOTE mode
CALL ↑C ESCAPE ↑C
deferred CALL ESCAPE " ↑C ESCAPE " ↑C
β (beta) (*) ESCAPE ↑C ↑C
HOLD (**) ↑G ESCAPE ↑G
UNHOLD ESCAPE " ↑G ESCAPE " ↑G
π (pi) (*) ESCAPE ↑G ↑G
(*) In a BUCKY-ALL-QUOTE mode, ↑C and ↑G represent BUCKY-β
and BUCKY-π, like other characters in BUCKY-QUOTE modes.
(**) Or toggling HOLD/UNHOLD if in TTY HTOGGLE mode.
The ESCAPE character (normally NULL, ↑@) is not quoted
even in ALL-QUOTE mode, since it is necessary to begin
the multi-keystroke sequences. If you have more than
one ESCAPE character because of macro redefinition, all
of your ESCAPE characters are unquoted.
Switching modes
The TTY DM command (and equivalent UUO) leave your terminal in
EDIT mode, i.e., assuming that you have an EDIT key and can
type all 256 possible 8-bit characters. You can switch modes
at any time, once you are a DM, using the ESCAPE ' (single-quote)
command, as follows:
ESCAPE ' enter NORMAL no-EDIT mode
ESCAPE 0 ' enter QUOTE no-EDIT mode
ESCAPE 1 ' enter CONTROL-QUOTE no-EDIT mode
ESCAPE 2 ' enter META-QUOTE no-EDIT mode
ESCAPE 3 ' enter CONTROL-META-QUOTE no-EDIT mode
BREAK ' enter EDIT key mode
BREAK 100 ' enter ALL-QUOTE no-EDIT mode
BREAK 101 ' enter CONTROL-ALL-QUOTE no-EDIT mode
BREAK 102 ' enter META-ALL-QUOTE no-EDIT mode
BREAK 103 ' enter CONTROL-META-ALL-QUOTE no-EDIT mode
(The ALL-QUOTE sequences are chosen to be hard to type
accidentally, since they will normally be done only by
programmable function keys on intelligent terminals.
However, if you are already in an ALL-QUOTE mode, you can
shift to another ALL-QUOTE mode with a single-digit argument
to the BREAK n ' command.)
Now, the only problem is, what if your keyboard can't type NULL,
which is the default ESCAPE character? (It is the ONLY ESCAPE
character in EDIT mode!) You use these monitor commands:
TTY NO EDIT enter NORMAL no-EDIT mode
TTY SETESC nn make the character with octal code nn an ESCAPE
You must be a DM to give the TTY NO EDIT command, and a NOEDIT DM
to give the TTY SETESC command. Once you have established an
ESCAPE command which you can type, you can use ESCAPE ' to adjust
your mode further.
The TTY SETESC command without an argument will type out all of
your currently defined ESCAPE characters.
The TTY [NO] HTOGGLE command sets [clears] the mode in which ↑G
toggles holding, instead of always entering holding. That
mode is orthogonal to NORMAL vs QUOTE, but it does not survive
TTY EDIT or BREAK '. TTY HTOGGLE is the default.
Restoring EDIT mode undoes any NOEDIT character redefinitions
you have done, so a later TTY NO EDIT will give you the default
meaning for all characters.
Redefining the redefinable characters
For the special case of redefining a character to be an ESCAPE,
there is the TTY SETESC command. Other redefinitions must be
done by UUO. You can redefine a character into any sequence
of up to 18 (decimal) SAIL characters.
If you have created another ESCAPE character by redefinition,
you can then redefine NULL (↑@), which is the default ESCAPE.
However, you are not allowed to redefine your only ESCAPE
character.
In general, the characters used in the macro definition are full
9-bit SAIL characters or escape codes, as typed at a local display
keyboard. Therefore, within the definition, the multi-character
DM sequences are not used. However, the macro definition may
contain special codes equivalent to the four quoting sequences
with and without bucky bits; these codes are meaningful only as
the last byte of a definition, to cause the next character actually
typed on the DM keyboard to be quoted.
The system program CHRMAC is used to define macros and to store
or retrieve macro definitions from files. Type R CHRMAC to run
the program, which documents itself.
The CHRMAC program uses the UUOs described below to set up macros
for your terminal.
UUO to set up a macro definition for a character:
call: MOVEI AC,ADDR
CHRMAC AC,
<error return -- code in AC>
<success return>
ADDR: CHAR,,LENGTH
BYTE (12)XX,XX,XX
ETC
CHAR is the character which is to be redefined. It must be a 7-bit
character, and must be one of the redefinable ones.
LENGTH is the number of 12.-bit bytes in the macro definition.
If LENGTH is zero then any previous macro will be flushed and
the character will have its default meaning.
The bytes are standard 9-bit SAIL characters, with the following
special codes allowed:
0600 CALL
2000 quote following char (↑Q)
2001 quote with CONTROL (↑P)
2002 quote with META (↑V)
2003 quote with CONTROL-META (↑W)
4041 BREAK
4042 ESCAPE
4044 CLEAR
4241 HOLD
4244 UNHOLD
4444 FLUSH DM QUEUES
If the UUO takes the direct return, the AC will contain one of these codes:
0 UUO not defined (FTNOED off) or system error
1 Job's TTY not a NOEDIT display
2 CHAR not a redefinable character
3 Trying to redefine the only ESCAPE character
4 LENGTH is greater than maximum allowed
5 Some byte isn't an allowable SAIL character
UUO to read a character macro:
call: MOVEI AC,ADDR
GETMAC AC,
<error return -- not a NOEDIT DM>
<success return -- ADDR is set up as CHRMAC arg block>
ADDR: CHR,,<length returned here>
BLOCK 6 <12.-bit bytes returned here>
The CHRMAC program (monitor command R CHRMAC) can be used to set
up character redefinitions. It will also save all of your
redefinitions in a file. so you can easily set up your terminal
the way you want it. It can also type out your redefinitions.
Now, here's what QUOTE mode is good for:
The user who doesn't want to have to learn a whole new set of line editor
commands (like ↑E for Enter insert mode) can type all the line editor commands
and all the bucky bits for commands to programs with only a few special
character sequences:
ESCAPE ↑P means add CONTROL bit to next char
ESCAPE ↑V means add META bit to next char
ESCAPE ↑W means add CONTROL and META bits to next char
Thus the line editor command αS could be typed as ESCAPE ↑P S. Of course,
someone who wanted to save a keystroke by learning all (or some of) the
Normal mode special functions of control chars could type αS as ESCAPE ↑S.
So this mode works both for people with good memories and for people who
like to simplify their lives.
Both of these users still have to know these two commands too, plus
what their escape character is:
CALL ↑C
HOLD ↑G
Now, one more good use of QUOTE mode is with a display that has
programmable keys. The programmable keys could be set up to send all the
common commands, especially the buckifiers (that add CONTROL and/or META)
listed above (ESC ↑P, ESC ↑V and ESC ↑W), and then the user could type all
the special SAIL graphics (↓α∧¬...) directly using their normal
ascii-control representations, with only one keystroke needed per such
character.
If you have a programmable terminal, you may even benefit from ALL-QUOTE
mode, in which even ↑C and ↑G are quoted, and even CALL and HOLD are
multi-character sequences.
On the other hand, if you don't have a programmable terminal, the
advantage of learning the NORMAL mode version of the line editor
commands is that any DD/III character can be typed with at most
two keystrokes, and the most common require only one. Also, you
avoid having to think about ESC " which is needed in QUOTE mode.